<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    #demo{
        position:relative;
        width: 100px;
        height: 100px;
        border-color: #000;
        border-width: 2px;
        border-style: solid;
        background-color: #fff;
        
    }
    #demo::before{
        display: block;
        content: '';
        position:absolute;
        border-width: 11px 0 11px 11px;
        border-style:solid;
        border-color: transparent transparent transparent #000;
        width: 0;
        height: 0;
        top: 20px;
        right: -12px;
    }
    #demo::after{
        z-index: 2;
        display: block;
        content: '';
        position:absolute;
        border-width: 10px 0 10px 10px;
        border-style:solid;
        border-color: transparent transparent transparent #fff;
        width: 0;
        height: 0;
        top: 21px;
        right: -11px;
    }
</style>
<body>
    <div id="demo"></div>
</body>
</html>